<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: 王文尧
  Date: 2024/7/8
  Time: 7:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员界面</title>
</head>
<body>
    <h1>管理员界面</h1>
    <%
        Map<String,Integer> userVisitCountMap = (Map<String,Integer>) application.getAttribute("userVisitCountMap");
        if (userVisitCountMap == null) {
            userVisitCountMap = new HashMap<>();
        }
    %>
    <table border="1">
        <tr>
            <th>ip 地址</th>
            <th>访问次数</th>
        </tr>
        <%
            for (String key : userVisitCountMap.keySet()) {
        %>
        <tr>
            <td><%=key%></td>
            <td><%=userVisitCountMap.get(key)%></td>
        </tr>
        <%
            }
        %>
    </table>
</body>
</html>
